package com.mud.ultimate.data;

public class DbConstants {

	// Broadcast Action, amely az adatbazis modosulasat jelzi
	public static final String ACTION_DATABASE_CHANGED = "NFS_DATABASE_CHANGED";

	// fajlnev, amiben az adatbazis lesz
	public static final String DATABASE_NAME = "data.db";
	// verzioszam
	public static final int DATABASE_VERSION = 1;
	// osszes belso osztaly DATABASE_CREATE szkriptje osszefuzve
	public static String DATABASE_CREATE_ALL = GameRecordConst.DATABASE_CREATE;
	// osszes belso osztaly DATABASE_DROP szkriptje osszefuzve
	public static String DATABASE_DROP_ALL = GameRecordConst.DATABASE_DROP;

	/* GameRecord osztaly DB konstansai */
	public static class GameRecordConst {
		// tabla neve
		public static final String DATABASE_TABLE = "game_record";
		// oszlopnevek
		public static final String KEY_ROWID = "_id";
		public static final String KEY_NAME = "name";
		public static final String KEY_SCORE = "score";
		public static final String KEY_DATE = "date";
		// sema letrehozo szkript
		public static final String DATABASE_CREATE = "create table if not exists "
				+ DATABASE_TABLE
				+ " ( "
				+ KEY_ROWID
				+ " integer primary key autoincrement, "
				+ KEY_NAME
				+ " text not null, "
				+ KEY_SCORE
				+ " int, "
				+ KEY_DATE
				+ " int ); ";
		// sema torlo szkript
		public static final String DATABASE_DROP = "drop table if exists "
				+ DATABASE_TABLE + "; ";
	}
}
